<template>
  <div class="weblogin">
    <div class="logo">
      <img src="../../public/logo.png" alt="" />
    </div>
    <div>
      <van-cell-group>
        <van-field v-model="tel" type="tel" label="手机号" />
        <!-- 允许输入正整数，调起纯数字键盘 -->
        <van-field v-model="digit" type="digit" label="验证码" />
        <!-- 允许输入数字，调起带符号的纯数字键盘 -->
      </van-cell-group>
    </div>
    <van-button type="warning" icon-position="center" size="large" to="/film">登录</van-button>
  </div>
</template>
<script>
export default {
  data () {
    return {
      tel: '',
      digit: ''
    }
  },
  methods: {
    handleLogin () {
      setTimeout(() => {
        localStorage.setItem('token', '后端返回的token字段')
        // this.$router.back() //返回

        this.$router.push(this.$route.query.redirect)
      }, 0)
    }
  }
}
</script>
<style lang="scss" scoped>
.logo {
  height: 60px;
  position: relative;
  margin: 60px 50%;
  img {
    position: absolute;
    height: 3.75rem;

    left: -1.875rem;
  }
}
.input-control {
  height: 15px;
  line-height: 15px;
  padding: 20px 0;
  width: 100%;
  font-size: 15px;
  color: #191a1b;
  border: 0;
  outline-width: 0;
}
</style>
